<template>
  <div class="nav">
    <el-form :inline="true" class="demo-form-inline">
      <el-form-item label="订单编号">
        <el-input
            placeholder="订单编号"
            v-model="searchParams.id"
        ></el-input>
      </el-form-item>
      <el-form-item label="订单类型">
        <el-select placeholder="请选择" v-model="searchParams.orderType">
          <el-option
              v-for="(key,value) in orderTypeList"
              :key="value"
              :label="key"
              :value="value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="支付方式">
        <el-select placeholder="请选择" v-model="searchParams.paymentMethodId">
          <el-option
              v-for="(key,value) in payTypeList"
              :key="key"
              :label="key"
              :value="value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="业务类型">
        <el-select placeholder="请选择" v-model="searchParams.businessType">
          <el-option
              v-for="(key,value) in businessTypeList"
              :key="value"
              :label="key"
              :value="value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="下单时间">
        <el-date-picker
            v-model="pickerOptions.startDate"
            type="datetimerange"
            value-format="yyyy-MM-dd HH:mm:ss"
            :picker-options="pickerOptions"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            align="right"
            @change="chooseTime">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="订单动作">
        <el-select placeholder="请选择" v-model="searchParams.orderAction">
          <el-option
              v-for="(key,value) in orderActionlist"
              :key="value"
              :label="key"
              :value="value">
          </el-option>

        </el-select>
      </el-form-item>
      <el-form-item label="订单状态">
        <el-select placeholder="请选择" v-model="searchParams.orderStatus">
          <el-option value="1" label="出库待审核">出库待审核</el-option>
          <el-option value="11"  label="已出库">已出库</el-option>
          <el-option value="2" label="出库正在审核">出库正在审核</el-option>
          <!--          <el-option-->
          <!--              v-for="(key,value) in orderStatusList"-->
          <!--              :key="value"-->
          <!--              :label="key"-->
          <!--              :value="value">-->
          <!--          </el-option>-->

        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="this.pageFind">搜索</el-button>
        <el-button type="warning" @click="resetForm">重置</el-button>
        <el-button type="info" @click="selectBy">生成出库单</el-button>
      </el-form-item>
    </el-form>
    <template>
      <el-table
          :data="this.orderList"
          style="width: 100%"
          ref="multipleTable"
          @selection-change="handleSelectionChange">
        >
        <el-table-column
            type="selection"
            width="55">
        </el-table-column>
        <el-table-column
            prop="id"
            label="订单编号"
            width="180">
        </el-table-column>
        <el-table-column
            prop="orderType"
            label="订单类型"
            width="180">
        </el-table-column>
        <el-table-column
            prop="orderAction"
            label="订单动作"
            width="180">
        </el-table-column>
        <el-table-column
            prop="businessType"
            label="业务类型">
        </el-table-column>
        <el-table-column
            prop="deliveryStyle"
            label="配送方式">
        </el-table-column>
        <el-table-column
            prop="paymentMethodId"
            label="支付方式">
        </el-table-column>
        <el-table-column prop="orderStatus" label="订单状态">

        </el-table-column>
        <el-table-column
            label="操作">
          <template v-slot="obj">

            <el-button
                type="primary"
                icon="el-icon-upload2"
                round
                @click="lookOrderInfo(obj.row)">查看
            </el-button>
          </template>
        </el-table-column>
      </el-table>
    </template>
    <div class="block">
      <el-pagination
          background
          layout="prev, pager, next"
          :total=total
          :current-page="this.searchParams.currentPage"
          :page-size="this.searchParams.pageSize"
          @current-change="currentPageChange"
          align="right">
      </el-pagination>
    </div>
  </div>
</template>
<script>
import index from "./index"

export default index
</script>
<style scoped>

</style>